package UMC.Data.Sql;


public abstract class DbBuilder {
    /// <summary>
    /// 增加主键的SQL
    /// </summary>
    /// <param name="name"></param>
    /// <param name="fields"></param>
    /// <returns></returns>
    public abstract String PrimaryKey(String name, String... fields);

    /// <summary>
    /// 创建表空间
    /// </summary>
    /// <param name="prefixion"></param>
    /// <returns></returns>
    public String Schema(String prefixion) {
        return "";
    }

    public String Column(String field) {
        return field;// String.Empty;
    }

    public abstract String Binary();

    public abstract String Integer();

    public abstract String Boolean();

    public abstract String String();

    public abstract String Text();

    public abstract String Number();

    public abstract String Date();

    public abstract String Guid();

    public abstract String Float();

    /// <summary>
    /// 增加列的SQL
    /// </summary>
    public abstract String AddColumn(String name, String field, String type);

    /// <summary>
    /// 删除列的SQL
    /// </summary>
    public abstract String DropColumn(String name, String field);

    /// <summary>
    /// 检测列名
    /// </summary>
    public Boolean Check(String name, String field, ISqler sqler) {
        return null;
    }

    /// <summary>
    /// 检测表名
    /// </summary>
    /// <param name="name"></param>
    /// <param name="sqler"></param>
    /// <returns></returns>
    public Boolean Check(String name, ISqler sqler) {
        return null;
    }
}